import javax.sound.midi.Soundbank;

public class TestComplex {
    public static void main(String[] args) {
        //初始化复数a
        Complex a = new Complex(0, 0);
        //设置复数的值为1 1
        a.setX(1);
        a.setY(1);
        //输出当前复数的值
        System.out.println("复数a-> x:" + a.getX());
        System.out.println("复数a-> y:" + a.getY());
        System.out.println(a.toString());

        //初始化复数b
        Complex b = new Complex(1, 1);
        //两复数相加 并且输出结果的值
        Complex result = a.add(b);
        System.out.println(result.toString());
        //两复数相减 并输出结果
        result = a.minus(b);
        System.out.println(result.toString());
        //两复数相乘 并输出结果
        result = a.multiple(b);
        System.out.println(result.toString());
        //两复数相除 并输出结果
        result = a.divide(b);
        System.out.println(result.toString());
    }
}
